Cut-Fail-Read-Write Prolog